<template>
  <div class="errPage-container">
    <el-row>
      <el-col :span="12">
        <h1 class="text-jumbo text-ginormous">403</h1>
        <h2>{{ msg }}</h2>
        <h6>如有不满请联系你领导，当然你也可以返回主页</h6>
        <el-button class="pan-btn green-btn pan-medium" @click="back">返回主页</el-button>
        <el-button class="pan-btn pink-btn pan-medium" @click="logout">注销</el-button>
      </el-col>
      <el-col :span="12">
        <img src="@/assets/403_images/403.gif" width="313" height="428" alt="403" />
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "Page403",
  created() {
    const { msg } = this.$route.query
    this.msg = msg ? msg : '你没有权限去该页面'
  },
  data() {
    return {
      msg: ''
    }
  },
  methods: {
    back() {
      this.$router.replace({ path: "/" });
    },
    async logout() {
      await this.$store.dispatch("user/logout");
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="scss" scoped>
.errPage-container {
  width: 800px;
  max-width: 100%;
  margin: 100px auto;
  .pan-gif {
    margin: 0 auto;
    display: block;
  }
  .pan-img {
    display: block;
    margin: 0 auto;
    width: 100%;
  }
  .text-jumbo {
    font-size: 60px;
    font-weight: 700;
    color: #484848;
  }
}
</style>
